//
//  FYNetworkingRequestUnit.h
//  FYNetworking
//
//  Created by Felix Yin on 2017/5/5.
//  Copyright © 2017年 Felix Yin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FYNetworkingRequestStting.h"

@interface FYNetworkingRequestUnit : NSObject

/**
 *  请求单元
 *
 *  @param requestParam      请求参数
 *  @param apiPath           请求地址
 *  @param requestType       请求类型
 *  @param progressCallBack  服务器响应进度回调
 *  @param operationCallBack 扩展操作回调
 *  @param completeCallBack 请求完成回调
 *
 *  @return 返回当前请求单元
 */
+(FYNetworkingRequestUnit *) request:(NSObject *) sender   requestParam:(NSDictionary *) requestParam APIPath:(NSString *) apiPath  requestType:(FYREquestType) requestType  resultProgressCallBack:(FYRequestProgressCallBack) progressCallBack operationCallBack:(FYRequestOperationCallBack) operationCallBack completeCallBack:(FYRequestCompleteCallBack) completeCallBack;

/**
 *  上传文件请求单元
 *
 *  @param requestParam           请求参数
 *  @param apiPath                请求地址
 *  @param uploadFileParameterName          上传文件名请求参数名
 *  @param fileName               上传文件名
 *  @param filePath               上传文件路径
 *  @param mineType               上传文件类型
 *  @param requestType            请求类型
 *  @param progressCallBack       请求进度
 *  @param uploadProgressCallBack 上传进度
 *  @param operationCallBack      操作回调
 *  @param completeCallBack       完成回调
 *
 *  @return 返回请求单元
 */
+(FYNetworkingRequestUnit *) request:(NSObject *) sender requestParam:(NSDictionary *) requestParam APIPath:(NSString *) apiPath uploadFileParameterName:(NSString *)uploadFileParameterName fileName:(NSString *) fileName  filePath:(NSString *)filePath mineType:(NSString *) mineType requestType:(FYREquestType) requestType  resultProgressCallBack:(FYRequestProgressCallBack) progressCallBack uploadProgressCallBack:(FYRequestProgressCallBack) uploadProgressCallBack operationCallBack:(FYRequestOperationCallBack) operationCallBack completeCallBack:(FYRequestCompleteCallBack) completeCallBack;

/**
 *  取消网络请求
 */
-(void) cancleRequest;

@end
